Imports System.Configuration.Provider

Public Class QuestionnaireProviderCollection
    Inherits ProviderCollection

    Public Overrides Sub Add(ByVal provider As ProviderBase)
        If (provider Is Nothing) Then
            Throw New ArgumentNullException("provider")
        End If
        If Not TypeOf provider Is QuestionnaireProvider Then
            Throw New ArgumentException("Wrong type of provider, UserInformationProvider type is required.")
        End If
        MyBase.Add(provider)
    End Sub

    Public Shadows Sub CopyTo(ByVal array As QuestionnaireProvider(), ByVal index As Integer)
        MyBase.CopyTo(array, index)
    End Sub

    Public Shadows ReadOnly Property Item(ByVal name As String) As QuestionnaireProvider
        Get
            Return CType(MyBase.Item(name), QuestionnaireProvider)
        End Get
    End Property

End Class
